package cn.wolfcode.util;

import lombok.Getter;

@Getter
public enum  ConsutpionEnum {
    CONSUME("待结算",0),
    AUDIT("待审核",1),
    FINISH("归档",2),
    FAILURE("坏账",3);
    private Integer value;
    private String name;

    ConsutpionEnum(String name,Integer value){
        this.name=name;
        this.value=value;
    }

    public static String findName(Integer value){
        ConsutpionEnum[] values = values();
        for (ConsutpionEnum consutpionEnum : values) {
            if (consutpionEnum.getValue().equals(value)){
                return consutpionEnum.getName();
            }
        }
        return null;
    }
}
